/*
 * @Author: heinan
 * @Date: 2021-07-15 11:27:56
 * @Last Modified by: heinan
 * @Last Modified time: 2021-07-15 12:45:15
 */
import { getList, addList } from "@/api/cart";
import { actionCreator } from "./index";
import { UPDATE_LIST } from "@/store/types/cart";


export function _getGroupList() {
  return async function (dispatch) {
    const result = await getList();
    dispatch(actionCreator(UPDATE_LIST, result.data.result));
  };
}

export function _addGroupList(title) {
  return async function () {
    return await addList(title);
  };
}
